package coml.jiyun.hp.wanandroid.ui.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import java.util.ArrayList;

public class HomeAdapter extends FragmentPagerAdapter{

    private ArrayList<Fragment> allfragments;


    public HomeAdapter(FragmentManager fm, ArrayList<Fragment> allfragments) {
        super(fm);
        this.allfragments = allfragments;
    }

    @Override
    public Fragment getItem(int position) {
        return allfragments.get(position);
    }

    @Override
    public int getCount() {
        return allfragments.size();
    }
}
